﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using Fusion;

namespace Fusion.Interface
{
	public class ChangerLabel : Control
	{
		Label leftLabel;
		Label rightLabel;

		public ChangerLabel( Vector2 center, Vector2 Size, VoidDelegate LeftEvent, VoidDelegate RightEvent )
		{
			position = center;
			size = Size;

			leftLabel = new Label( center + new Vector2( (-Size.X/2) - 2, 0 ), Size, "<", true, LeftEvent );
			rightLabel = new Label( center + new Vector2( (Size.X/2) + 2, 0 ), Size, ">", true, RightEvent );

			drawBorder = false;
		}

		public override void Update()
		{
			leftLabel.Update();
			rightLabel.Update();
			base.Update();
		}

		public override void Input( Vector2 cursor, bool button )
		{
			leftLabel.Input( cursor, button );
			rightLabel.Input( cursor, button );
		}

		public override void Draw()
		{
			leftLabel.Draw();
			rightLabel.Draw();
		}
	}
}
